package lrg10002.plugins.akperms.jdom;

import java.util.Map;

import org.jdom2.Attribute;
import org.jdom2.AttributeType;
import org.jdom2.CDATA;
import org.jdom2.Comment;
import org.jdom2.Content;
import org.jdom2.DefaultJDOMFactory;
import org.jdom2.DocType;
import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.EntityRef;
import org.jdom2.JDOMFactory;
import org.jdom2.Namespace;
import org.jdom2.Parent;
import org.jdom2.ProcessingInstruction;
import org.jdom2.Text;
import org.jdom2.input.sax.SAXHandler;

public class AKFactory implements JDOMFactory{
	
	public SAXHandler handler;
	public DefaultJDOMFactory wr;
	
	public AKFactory(DefaultJDOMFactory wr) {
		this.wr = wr;
	}

	@Override
	public void addContent(Parent arg0, Content arg1) {
		wr.addContent(arg0, arg1);
		
	}

	@Override
	public void addNamespaceDeclaration(Element arg0, Namespace arg1) {
		wr.addNamespaceDeclaration(arg0, arg1);
		
	}

	@Override
	public Attribute attribute(String arg0, String arg1) {
		return wr.attribute(arg0, arg1);
	}

	@Override
	public Attribute attribute(String arg0, String arg1, Namespace arg2) {
		return wr.attribute(arg0, arg1, arg2);
	}

	@Override
	@Deprecated
	public Attribute attribute(String arg0, String arg1, int arg2) {
		return wr.attribute(arg0, arg1, arg2);
	}

	@Override
	public Attribute attribute(String arg0, String arg1, AttributeType arg2) {
		return wr.attribute(arg0, arg1, arg2);
	}

	@Override
	@Deprecated
	public Attribute attribute(String arg0, String arg1, int arg2, Namespace arg3) {
		return wr.attribute(arg0, arg1, arg2, arg3);
	}

	@Override
	public Attribute attribute(String arg0, String arg1, AttributeType arg2, Namespace arg3) {
		return wr.attribute(arg0, arg1, arg2, arg3);
	}

	@Override
	public CDATA cdata(String arg0) {
		return wr.cdata(arg0);
	}

	@Override
	public CDATA cdata(int arg0, int arg1, String arg2) {
		return wr.cdata(arg0, arg1, arg2);
	}

	@Override
	public Comment comment(String arg0) {
		return wr.comment(arg0);
	}

	@Override
	public Comment comment(int arg0, int arg1, String arg2) {
		return wr.comment(arg0, arg1, arg2);
	}

	@Override
	public DocType docType(String arg0) {
		return wr.docType(arg0);
	}

	@Override
	public DocType docType(String arg0, String arg1) {
		return wr.docType(arg0, arg1);
	}

	@Override
	public DocType docType(String arg0, String arg1, String arg2) {
		return wr.docType(arg0, arg1, arg2);
	}

	@Override
	public DocType docType(int arg0, int arg1, String arg2) {
		return wr.docType(arg0, arg1, arg2);
	}

	@Override
	public DocType docType(int arg0, int arg1, String arg2, String arg3) {
		return wr.docType(arg0, arg1, arg2, arg3);
	}

	@Override
	public DocType docType(int arg0, int arg1, String arg2, String arg3, String arg4) {
		return wr.docType(arg0, arg1, arg2, arg3, arg4);
	}

	@Override
	public Document document(Element arg0) {
		return wr.document(arg0);
	}

	@Override
	public Document document(Element arg0, DocType arg1) {
		return wr.document(arg0, arg1);
	}

	@Override
	public Document document(Element arg0, DocType arg1, String arg2) {
		return wr.document(arg0, arg1, arg2);
	}

	@Override
	public Element element(String arg0) {
		return element(arg0, (Namespace) null);
	}

	@Override
	public Element element(String arg0, Namespace arg1) {
		AKElement e = new AKElement(arg0, arg1, null);
		e.setLineNumber(this.handler.getDocumentLocator().getLineNumber());
		return e;
	}

	@Override
	public Element element(String arg0, String arg1) {
		return this.element(arg0, (Namespace) null);
	}

	@Override
	public Element element(String arg0, String arg1, String arg2) {
		return this.element(arg0, (Namespace) null);
	}

	@Override
	public Element element(int arg0, int arg1, String arg2) {
		return this.element(arg2, (Namespace) null);
	}

	@Override
	public Element element(int arg0, int arg1, String arg2, Namespace arg3) {
		return this.element(arg2, (Namespace) null);
	}

	@Override
	public Element element(int arg0, int arg1, String arg2, String arg3) {
		return this.element(arg2, (Namespace) null);
	}

	@Override
	public Element element(int arg0, int arg1, String arg2, String arg3, String arg4) {
		return this.element(arg2, (Namespace) null);
	}

	@Override
	public EntityRef entityRef(String arg0) {
		return wr.entityRef(arg0);
	}

	@Override
	public EntityRef entityRef(String arg0, String arg1) {
		return wr.entityRef(arg0, arg1);
	}

	@Override
	public EntityRef entityRef(String arg0, String arg1, String arg2) {
		return wr.entityRef(arg0, arg1, arg2);
	}

	@Override
	public EntityRef entityRef(int arg0, int arg1, String arg2) {
		return wr.entityRef(arg0, arg1, arg2);
	}

	@Override
	public EntityRef entityRef(int arg0, int arg1, String arg2, String arg3) {
		return wr.entityRef(arg0, arg1, arg2, arg3);
	}

	@Override
	public EntityRef entityRef(int arg0, int arg1, String arg2, String arg3, String arg4) {
		return wr.entityRef(arg0, arg1, arg2, arg3, arg4);
	}

	@Override
	public ProcessingInstruction processingInstruction(String arg0) {
		return wr.processingInstruction(arg0);
	}

	@Override
	public ProcessingInstruction processingInstruction(String arg0, Map<String, String> arg1) {
		return wr.processingInstruction(arg0, arg1);
	}

	@Override
	public ProcessingInstruction processingInstruction(String arg0, String arg1) {
		return wr.processingInstruction(arg0, arg1);
	}

	@Override
	public ProcessingInstruction processingInstruction(int arg0, int arg1, String arg2) {
		return wr.processingInstruction(arg0, arg1, arg2);
	}

	@Override
	public ProcessingInstruction processingInstruction(int arg0, int arg1, String arg2, Map<String, String> arg3) {
		return wr.processingInstruction(arg0, arg1, arg2, arg3);
	}

	@Override
	public ProcessingInstruction processingInstruction(int arg0, int arg1, String arg2, String arg3) {
		return wr.processingInstruction(arg0, arg1, arg2, arg3);
	}

	@Override
	public void setAttribute(Element arg0, Attribute arg1) {
		wr.setAttribute(arg0, arg1);
		
	}

	@Override
	public void setRoot(Document arg0, Element arg1) {
		wr.setRoot(arg0, arg1);
		
	}

	@Override
	public Text text(String arg0) {
		return wr.text(arg0);
	}

	@Override
	public Text text(int arg0, int arg1, String arg2) {
		return wr.text(arg0, arg1, arg2);
	}
	
	
}
